package com.glink.manage.dto.person;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.glink.common.serializer.JsonDate5DeSerializer;
import com.glink.common.serializer.JsonDate5Serializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
* @author  qiushaoshan
* @since 2025-01-13
*/
@ApiModel(value="PersonViolationRegulationsRecordSaveDTO对象", description="人员违章记录-保存")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PersonViolationRegulationsRecordSaveDTO implements Serializable {

    private static final long serialVersionUID = 7942966868003261983L;

    @ApiModelProperty(value = "人员ID")
    private String personObjId;
    
    @ApiModelProperty(value = "违章时间;yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = JsonDate5Serializer.class)
    @JsonDeserialize(using = JsonDate5DeSerializer.class)
    @NotNull(message = "违章时间不能为空")
    private Date time;

    @ApiModelProperty(value = "违章行为")
    @NotBlank(message = "违章行为不能为空")
    private String behavior;
}
